package com.ktjiaoyu.crm.Mapper;

//import org.apache.catalina.mapper.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;
import sun.invoke.util.Wrapper;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

public interface BaseMapper<T> extends Mapper {
    int insert(T entity);

    int deleteById(Serializable id);

    int deleteByMap(@Param("cm") Map<String, Object> columnMap);

    int delete(@Param("ew") Wrapper wrapper);

    int deleteBatchIds(@Param("coll") Collection<? extends Serializable> idList);

    int updateById(@Param("et") T entity);

    int update(@Param("et") T entity, @Param("ew") Wrapper updateWrapper);

    T selectById(Serializable id);

    List<T> selectBatchIds(@Param("coll") Collection<? extends Serializable> idList);

    List<T> selectByMap(@Param("cm") Map<String, Object> columnMap);

    T selectOne(@Param("ew") Wrapper queryWrapper);

    Integer selectCount(@Param("ew") Wrapper queryWrapper);

    List<T> selectList(@Param("ew") Wrapper queryWrapper);

    List<Map<String, Object>> selectMaps(@Param("ew") Wrapper queryWrapper);

    List<Object> selectObjs(@Param("ew") Wrapper queryWrapper);

    IPage selectPage(IPage page, @Param("ew") Wrapper queryWrapper);

    IPage<Map<String,ew>> selectMapsPage(IPage page, @Param("ew") Wrapper queryWrapper);
}
